﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace Things.Web.Components
{
    public partial class OrderGoodsList : System.Web.UI.UserControl
    {
        public Guid GoodsOrderID
        {
            get;
            set;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData();
            }
        }

        protected void BindData()
        {
            Things.BLL.GoodsOrders goBLL = new BLL.GoodsOrders();
            DataSet ds = goBLL.GetGoodsListByGoodsOrderID(GoodsOrderID);

            gridView.DataSource = ds;
            gridView.DataBind();
        }

        protected void gridView_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                //string strGUID = gridView.DataKeys[e.Row.DataItemIndex].Value.ToString();
                //Guid guid = Guid.Empty;
                //if (Guid.TryParse(strGUID, out guid) == true)
                //{
                    
                //}

            }
        }
    }
}